﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using dotSimpl.wlanner.AddIns.Contracts;
using AddInActorView;

namespace AddInSideAdapters
{
    [System.AddIn.Pipeline.AddInAdapter]
    public class ActorViewToContractAdapter : System.AddIn.Pipeline.ContractBase, IActorContract
    {
        #region Fields

        private ActorView actorView;

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of adapter.
        /// </summary>
        public ActorViewToContractAdapter(ActorView actorView)
        {
            this.actorView = actorView;
        }

        #endregion

        #region IActorAddIn Members

        public string InternalName
        {
            get { return actorView.InternalName; }
        }

        public string CompatibilityVersion
        {
            get { return actorView.CompatibilityVersion; }
        }

        public KeyValuePair<string, string>[] GetInitialSettins()
        {
            return actorView.GetInitialSettins();
        }

        public string[] GetSettingNames()
        {
            return actorView.GetSettingNames();
        }

        public void ApplySettings(KeyValuePair<string, string>[] settings, Guid networkCard)
        {
            actorView.ApplySettings(settings, networkCard);
        }

        #endregion
    }
}
